import {App, Modal} from "obsidian";

import MyPlugin from "../../main";

// 添加页面的操作33
export function 简单的弹框模板(this_:MyPlugin){
	this_.addCommand({
		id: 'open-sample-modal-simple',
		name: 'sjz-简单的弹框模板',
		callback: () => {
			new SampleModal(this_.app).open();
		}
	});
}

export default class SampleModal extends Modal {
	constructor(app: App) {
		super(app);
	}

	onOpen() {
		const {contentEl} = this;
		contentEl.setText('欢迎来到史锦泽的插件');
	}

	onClose() {
		const {contentEl} = this;
		contentEl.empty();
	}
}
